/*
 * @Descripttion: 
 * @Author: xiaodong
 * @Date: 2020-12-04 20:22:42
 * @LastEditTime: 2021-01-26 17:35:49
 * @FilePath: \cloud-monitor-client\src\api\performance\index.js
 */
import axios from '@/libs/api.request'
import { getProjectId } from '@/libs/util'

export const fetchUrlList = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/url_list`,
    method: 'get',
    params: {
      ...params
    }
  })
}
export const fetchApiList = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/api_list`,
    method: 'get',
    params: {
      ...params
    }
  })
}
export const fetchTimeLine = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/url/overview`,
    method: 'get',
    params: {
      ...params
    }
  })
}
export const fetchIndicatorOverview = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/indicator/overview`,
    method: 'get',
    params: {
      ...params
    }
  })
}
export const fetchStatisticsData = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/api/statistics_data`,
    method: 'get',
    params: {
      ...params
    }
  })
}

export const fetchApiOverview = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/api_overview`,
    method: 'get',
    params: {
      ...params
    }
  })
}

export const fetchTimeDetail = (params) => {
  return axios.request({
    url: `project/${getProjectId()}/api/performance/url/line_chart`,
    method: 'get',
    params: {
      ...params
    }
  })
}
